#include "_public.h"

void EXIT(int sig){
    cout << "sig = " << sig << endl;
    if(sig == 2){
        exit(0);
    }
}

CPActive Active;

int main(int argc, char *argv[]){
    if(argc != 3){
        cout << "USING: ./book procname" << endl;
        return 0;
    }

    signal(2, EXIT);
    signal(15, EXIT);

    
    Active.AddPInfo(atoi(argv[2]), argv[1]);
    while(true){
        Active.UptATime();
        sleep(10);
    }

    return 0;
}
